package cn.edu.cqut.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.baomidou.mybatisplus.annotation.TableId;
import java.io.Serializable;

/**
 * <p>
 * 
 * </p>
 *
 * @author cqut-917371
 * @since 2020-06-28
 */
public class Customer extends Model<Customer> {

	private static final long serialVersionUID=1L;

    /**
     * 客户编号
     */
    @TableId(value = "cus_no", type = IdType.AUTO)
    private Integer cusNo;

    /**
     * 客户名称
     */
    private String cusName;

    /**
     * 客户地区（1：东北，2：西北，3：华北，4：华中，5：华南，6：西南，7：华东）
     */
    private Integer cusRegion;

    /**
     * 客户网址
     */
    private String cusUrl;

    /**
     * 客户等级(1-战略合作伙伴、2-合作伙伴、3-大客户、4-重点开发客户、5-普通客户、6-VIP客户)
     */
    private Integer cusLevel;

    /**
     * 客户信用度(1-一级，2-二级，3-三级，4-四级，5-五级)
     */
    private Integer cusCredit;

    /**
     * 客户满意度(1-一级，2-二级，3-三级，4-四级，5-五级)
     */
    private Integer cusSatisfaction;

    /**
     * 客户状态(1-正常，0-不正常)
     */
    private Integer cusState;


    public Integer getCusNo() {
        return cusNo;
    }

    public void setCusNo(Integer cusNo) {
        this.cusNo = cusNo;
    }

    public String getCusName() {
        return cusName;
    }

    public void setCusName(String cusName) {
        this.cusName = cusName;
    }

    public Integer getCusRegion() {
        return cusRegion;
    }

    public void setCusRegion(Integer cusRegion) {
        this.cusRegion = cusRegion;
    }

    public String getCusUrl() {
        return cusUrl;
    }

    public void setCusUrl(String cusUrl) {
        this.cusUrl = cusUrl;
    }

    public Integer getCusLevel() {
        return cusLevel;
    }

    public void setCusLevel(Integer cusLevel) {
        this.cusLevel = cusLevel;
    }

    public Integer getCusCredit() {
        return cusCredit;
    }

    public void setCusCredit(Integer cusCredit) {
        this.cusCredit = cusCredit;
    }

    public Integer getCusSatisfaction() {
        return cusSatisfaction;
    }

    public void setCusSatisfaction(Integer cusSatisfaction) {
        this.cusSatisfaction = cusSatisfaction;
    }

    public Integer getCusState() {
        return cusState;
    }

    public void setCusState(Integer cusState) {
        this.cusState = cusState;
    }

    @Override
    protected Serializable pkVal() {
        return this.cusNo;
    }
    
    public String getCusRegionCN() {
    	String ret = "";
    	switch(cusRegion) {
    	case 1:
    		ret = "东北";
    		break;
    	case 2:
    		ret = "西北";
    		break;
    	case 3:
    		ret = "华北";
    		break;
    	case 4:
    		ret = "华中";
    		break;
    	case 5:
    		ret = "华南";
    		break;
    	case 6:
    		ret = "西南";
    		break;
    	case 7:
    		ret = "华东";
    		break;
    	}
    	
    	return ret;
	}

    @Override
    public String toString() {
        return "Customer{" +
        "cusNo=" + cusNo +
        ", cusName=" + cusName +
        ", cusRegion=" + cusRegion +
        ", cusUrl=" + cusUrl +
        ", cusLevel=" + cusLevel +
        ", cusCredit=" + cusCredit +
        ", cusSatisfaction=" + cusSatisfaction +
        ", cusState=" + cusState +
        "}";
    }
}